﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Model;

namespace BLL
{
  public  class UserInfoBLL
    {
        UserDAL dal = new UserDAL();
        public List<UserInfo> UserInformation()
        {
            return dal.UserInformation();
        }
        public UserInfo Fid(int id)
        {
            return dal.UserInformation().Where(a=>a.UserCode==id).FirstOrDefault();
        }
        public bool UserInsert(UserInfo info)
        {
            return dal.UserInsert(info);
        }
        public bool ADD(SignIn ka)
        {
            return dal.ADD(ka);
        }
        public List<SignIn> GetListByID()
        {
            return dal.GetListByID();
        }
        public SignIn GetOneByID(SignIn info)
        {
            return dal.GetListByID().Where(a => a.SignInName == info.SignInName && a.SignInPwd == info.SignInPwd).SingleOrDefault();
        }
    }
}
